#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
int main() {
  int n;
  cin >> n;
  if (n == 0) {
    cout << n;
    return 0;
  }

  while (n != 0) {
    int k = ceil(n / (-2.0));
    int yu = n - k * (-2);
    ans.push_back(yu);
    // s = to_string(k) + s ; 也可以用字符串
    n = k;
  }

  for (auto it = ans.rbegin(); it != ans.rend(); it++)
    cout << *it;

  return 0;
}